import request from '@/utils/request'

export function crolParam(query) {
  return request({
    url: '/basic/collectPoint/crolParam',
    method: 'get',
    params: query
  })
}

export function uploadLonLat(data) {
  return request({
    url: '/basic/collectPoint/lonLat',
    method: 'get',
    params: data
  })
}

export function getLatestData(query) {
  return request({
    url: '/basic/collectPoint/getLatestData',
    method: 'get',
    params: query
  })
}

export function getHistoryData(query) {
  return request({
    url: '/basic/collectPoint/getHistoryData',
    method: 'get',
    params: query
  })
}

//初始化缓存
export function initCacheData(query) {
  return request({
    url: '/basic/collectPoint/initCacheData',
    method: 'get',
    params: query,
    timeout: 30000
  })
}

export function selectCollectPoints(query) {
  return request({
    url: '/basic/collectPoint/queryCollectPoints',
    method: 'get',
    params: query
  })
}

// 查询采集信息管理列表
export function listCollectPointAndStatus(query) {
  return request({
    url: '/basic/collectPoint/collectPointsAndStatus',
    method: 'get',
    params: query
  })
}

// 查询采集信息管理列表
export function listCollectPoint(query) {
  return request({
    url: '/basic/collectPoint/list',
    method: 'get',
    params: query
  })
}

// 查询采集信息管理详细
export function getCollectPoint(id) {
  return request({
    url: '/basic/collectPoint/' + id,
    method: 'get'
  })
}

// 新增采集信息管理
export function addCollectPoint(data) {
  return request({
    url: '/basic/collectPoint',
    method: 'post',
    data: data
  })
}

// 修改采集信息管理
export function updateCollectPoint(data) {
  return request({
    url: '/basic/collectPoint',
    method: 'put',
    data: data
  })
}

// 删除采集信息管理
export function delCollectPoint(id) {
  return request({
    url: '/basic/collectPoint/' + id,
    method: 'delete'
  })
}

// 导出采集信息管理
export function exportCollectPoint(query) {
  return request({
    url: '/basic/collectPoint/export',
    method: 'get',
    params: query
  })
}

export function downAllDev(query) {
  return request({
    url: '/basic/collectPoint/downAllDev',
    method: 'get',
    params: query
  })
}
export function downSelDev(query) {
  return request({
    url: '/basic/collectPoint/downSelDev',
    method: 'get',
    params: query
  })
}
export function downTakeEffectDev(query) {
  return request({
    url: '/basic/collectPoint/downTakeEffectDev',
    method: 'get',
    params: query
  })
}
export function downSaveDev(query) {
  return request({
    url: '/basic/collectPoint/downSaveDev',
    method: 'get',
    params: query
  })
}
export function queryCount(query) {
  return request({
    url: '/basic/collectPoint/queryCount',
    method: 'get',
    params: query
  })
}
export function downRestoreDev(query) {
  return request({
    url: '/basic/collectPoint/downRestoreDev',
    method: 'get',
    params: query
  })
}
